package demo;

import java.util.Scanner;

public class test2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 3;
        while (count != 0) {
            String password = sc.nextLine();
            if (password.equals("123")){
                System.out.println("登录成功");
            }else{
                count--;
                System.out.println("你还有"+count+"次机会");
            }
        }
    }
}
